]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st/entry: Bind ClutterText reactivity to entry
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 18 Mar 2020 21:10:36 +0000 (22:10 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Sun, 29 Mar 2020 20:12:57 +0000 (22:12 +0200)
The text is part of the entry, so it is surprising that it can
still be edited when the entry itself isn't reactive. Address
this by setting up a binding instead of expecting all consumers
to handle the case themselves.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2423

js/ui/appDisplay.js
src/st/st-entry.c

index b191d5814daf4f2cee75a93fe6c17cc47c15c534..a8c0cb3c22da1b1d06b1540bb8e463dd3e552795 100644 (file)
@@ -691,7 +691,6 @@ var AllView = GObject.registerClass({
 
             // Toggle search entry
             Main.overview.searchEntry.reactive = !isOpen;
-            Main.overview.searchEntry.clutter_text.reactive = !isOpen;
             Main.overview.searchEntry.clutter_text.editable = !isOpen;
 
             this._displayingPopup = isOpen;
index a0f5cb8d0e09d1d25cd18c029a7b8c73c1ceb96a..2be524bb36cb12908b1402fc86e3f6735c4a6803 100644 (file)
@@ -977,6 +977,10 @@ st_entry_init (StEntry *entry)
                               "single-line-mode", TRUE,
                               NULL);
 
+  g_object_bind_property (G_OBJECT (entry), "reactive",
+                          priv->entry, "reactive",
+                          G_BINDING_DEFAULT);
+
   g_signal_connect (priv->entry, "key-focus-in",
                     G_CALLBACK (clutter_text_focus_in_cb), entry);